package LearnDataStructure.a_线性结构.列表.官方ListAPI;

import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

/**
 * @version: 1.0
 * @Author: wuqiu
 * @date: 2023-07-02 16:57
 * @description: LeetcodeLearnAlgorithm -> LearnDataStructure.a_线性结构.列表.官方ListAPI
 */
public class LinkedListAPI {
    public static void main(String[] args) {
        List<String> list = new LinkedList<String>();
        list.add("王");
        list.add("英");
        list.add("龙");
        list.add("雪");
        list.add("虬");
        list.add("0");

        System.out.println(list.get(0));
        list.remove("龙");
        System.out.println(list);
        list.remove(0);
        System.out.println(list);
        System.out.println(list.contains("雪"));
        list.set(3,"100");
        System.out.println(list);
        Collections.sort(list);
        System.out.println(list);
    }
}
